package com.ruoyi.yljf.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.yljf.mapper.ScoreTypeMapper;
import com.ruoyi.yljf.domain.ScoreType;
import com.ruoyi.yljf.service.IScoreTypeService;

/**
 * 用户积分获取方式表Service业务层处理
 * 
 * @author TAT
 * @date 2025-04-11
 */
@Service
public class ScoreTypeServiceImpl extends ServiceImpl<ScoreTypeMapper, ScoreType> implements IScoreTypeService {
    @Autowired
    private ScoreTypeMapper scoreTypeMapper;
    
    /**
     * 查询用户积分获取方式表列表
     * 
     * @param scoreType 用户积分获取方式表
     * @return 用户积分获取方式表
     */
    @Override
    public List<ScoreType> selectScoreTypeList(ScoreType scoreType) {
    	LambdaQueryWrapper<ScoreType> queryWrapper = Wrappers.lambdaQuery();
        if (StringUtils.isNotEmpty(scoreType.getType())) {
			queryWrapper.eq(ScoreType::getType, scoreType.getType());
		}
        if (StringUtils.isNotNull(scoreType.getScore())) {
			queryWrapper.eq(ScoreType::getScore, scoreType.getScore());
		}
        return scoreTypeMapper.selectList(queryWrapper);
    }
}
